<template>
  <a-menu-item
    key="report"
    :class="{ 'ant-menu-item': true, 'ant-menu-item-selected' : isExactActive}"
  >
    <a :href="href">
      <a-icon :type="configuration.iconType" />
      <span>{{configuration.navName}}</span>
    </a>
  </a-menu-item>
</template>

<script>
const NAV_LINK_TYPES = {
  report: {
    iconType: 'pie-chart',
    navName: '校招数据报表'
  },
  default: {
    iconType: 'user',
    navName: '校招学生名单'
  }
}

export default {
  name: "NavLink",
  props: {
    isExactActive: {
      type: Boolean,
      default: false
    },
    type: {
      type: String,
      default: 'default'
    },
    href: {
      type: String,
      default: '/'
    }
  },
  computed: {
    configuration: ({ type }) => {
      return NAV_LINK_TYPES[type]
    }
  }
}
</script>

<style scoped>

</style>
